<extend name="Public/base"/>

<block name="body">
	<div class="am-cf am-u-md-12 header-title">
		<h2>
			{$info['id']?'编辑':'新增'}导航
			<notempty name="pid">
				[&nbsp;父导航：<a href="{:U('index','pid='.$pid)}">{$parent.title}</a>&nbsp;]
			</notempty>
		</h2>
	</div>
    <div class="am-cf am-u-md-12 header-title">
	<form action="{:U()}" method="post" class="am-form-horizontal">
        <div class="with-padding">
            <div class="am-form-group">
                <label class="am-u-sm-2 am-form-label">导航标题</label>
                <div class="am-u-sm-10">
                    <input type="text" class="text input-large am-form-field form-input-width" name="title" value="{$info.title|default=''}">
                    <span class="am-form-help">（用于显示的文字）</span>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-2 am-form-label">当前标识</label>
                <div class="am-u-sm-10">
                    <input type="text" class="text input-large am-form-field form-input-width" name="active" value="{$info.active|default=''}">
                    <span class="am-form-help">（当前标识）</span>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-2 am-form-label">导航连接</label>
                <div class="am-u-sm-10">
                    <input type="text" class="text input-large am-form-field form-input-width" name="url" value="{$info.url|default=''}">
                    <span class="am-form-help">（用于调转的URL，支持带http://的URL或U函数参数格式）</span>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-2 am-form-label">父导航</label>
                <div class="am-u-sm-10">
                    <select name="pid" class="am-form-field form-select-size">
                        <option <empty name="pid" > selected</empty>value="0">顶级菜单</option>
                        <volist name="pnav" id="p">
                            <option <eq name="p.id" value="$pid" >selected</eq> value="{$p.id}">{$p.title}</option>
                        </volist>
                    </select>
                    <span class="am-form-help">（仅支持二级）</span>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-2 am-form-label">新窗口打开</label>
                <div class="am-u-sm-10">
                    <select name="target" class="am-form-field form-select-size">
                        <option value="0" >否</option>
                        <option value="1"  <eq  name="info.target" value="1">selected</eq>>是</option>
                    </select>
                    <span class="am-form-help">（是否新窗口打开链接）</span>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-2 am-form-label">图标</label>
                <div class="am-u-sm-10">
                    <input type="text" class="text input-large am-form-field form-input-width" name="icon" value="{$info.icon|default=''}">
                    <span class="am-form-help">输入图标英文</span>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-2 am-form-label">优先级</label>
                <div class="am-u-sm-10">
                    <input type="text" class="text input-small am-form-field form-input-width" name="sort" value="{$info.sort|default='1'}">
                    <span class="am-form-help">（导航显示顺序）</span>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-2 am-form-label">文字颜色</label>
                <div class="am-u-sm-10">
                    <input type="text" class="text input-small am-form-field form-input-width" name="color" value="{$info.color}">
                    <span class="am-form-help">（右上角的标志点颜色，支持各类css表示方式）</span>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-2 am-form-label">标志点颜色</label>
                <div class="am-u-sm-10">
                    <input type="text" class="text input-small am-form-field form-input-width" name="band_color" value="{$info.band_color}">
                    <span class="am-form-help">（右上角的标志点颜色，支持各类css表示方式）</span>
                </div>
            </div>
            <div class="am-form-group">
                <label class="am-u-sm-2 am-form-label">标志点文字</label>
                <div class="am-u-sm-10">
                    <input type="text" class="text input-small am-form-field form-input-width" name="band_text" value="{$info.band_text}">
                    <span class="am-form-help">（右上角的标志点文字，不要太长，没有自动隐藏）</span>
                </div>
            </div>
        </div>

		<div class="am-form-group with-padding">
            <div class="am-u-sm-10 am-u-sm-offset-2">
    			<input type="hidden" name="id" value="{$info.id|default=''}">
    			<button class="am-btn am-btn-primary submit-btn ajax-post" id="submit" type="submit" target-form="am-form-horizontal">确 定</button>
    			<button class="am-btn am-btn-default btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
		</div>
	</form>
    </div>
</block>
<block name="script">
<script type="text/javascript" charset="utf-8">
	//导航高亮
	highlight_subnav('{:U('index')}');
</script>
</block>
